Skip to content

Conversation

@jonathan-buttner
Copy link
Contributor

This PR fixes an issue I noticed locally where running ./gradlew :x-pack:plugin:inference:qa:inference-service-tests:javaRestTest would result in a test failure that I could reproduce unless running the entire suite over again. I believe the issue is that since we're using a static variable for the mock web server, the authorization response was only being added once. There are two classes that extend BaseMockEISAuthServerTest which I think means that one class would have the response ready but the other class wouldn't. In my local testing the class that would fail would change randomly which seems to indicate that whichever test class got run first would succeed. When a class runs it pops off the response. The way the base class was written it was assuming the class loader would run twice. The strange thing is that the http server would get started on different ports 🤷‍♂️

I'm not sure why this isn't failing in CI though 🤔

@jonathan-buttner jonathan-buttner added >non-issue :ml Machine learning Team:ML Meta label for the ML team v8.19.0 v9.1.0 labels May 29, 2025
@jonathan-buttner jonathan-buttner marked this pull request as ready for review May 30, 2025 16:48
@jonathan-buttner jonathan-buttner added the auto-backport Automatically create backport pull requests when merged label May 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@jonathan-buttner jonathan-buttner merged commit 7f7cb83 into elastic:main May 30, 2025
17 of 18 checks passed
@jonathan-buttner jonathan-buttner deleted the ml-fix-eis-auth-test-setup branch May 30, 2025 18:45
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19

elasticsearchmachine pushed a commit that referenced this pull request May 30, 2025
…#128695)

* Add response before each test file for eis

* Fixing the expected values

* Adding response before cluster starts
mridula-s109 pushed a commit that referenced this pull request Jun 2, 2025
* Add response before each test file for eis

* Fixing the expected values

* Adding response before cluster starts
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jun 3, 2025
…128640)

* Add response before each test file for eis

* Fixing the expected values

* Adding response before cluster starts
joshua-adams-1 pushed a commit to joshua-adams-1/elasticsearch that referenced this pull request Jun 3, 2025
…128640)

* Add response before each test file for eis

* Fixing the expected values

* Adding response before cluster starts
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/elasticsearch that referenced this pull request Jun 5, 2025
…128640)

* Add response before each test file for eis

* Fixing the expected values

* Adding response before cluster starts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :ml Machine learning >non-issue Team:ML Meta label for the ML team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants